package com.bby.disk.bean.req;

import com.bby.disk.manager.virtual.VirtualFile;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NonNull;

@Data
public class UploadTaskInfo {
    @NonNull
    protected String guid;

//    @NonNull
    protected VirtualFile fileInfo;
    /**
     * 父目录，可为path或者id
     */
    @NonNull
    protected String target;
    /**
     * 使用 path 还是 id
     */
    protected boolean usePath = false;
    protected boolean chunked = false;
    protected Long chunks;

    public UploadTaskInfo() {
    }

    public UploadTaskInfo(UploadTaskInfo request) {
        this.guid = request.getGuid();
        this.fileInfo = request.getFileInfo();
        this.target = request.getTarget();
        this.usePath = request.isUsePath();
        this.chunked = request.isChunked();
        this.chunks = request.getChunks();
    }
}
